//
//  FControl.h
//  test
//
//  Created by 袁飞 on 12-7-12.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FControl.h"




@interface FButton : FControl{
  float     scaled_;
  CCSprite  *normal_sprite_;
  CCSprite  *highlight_sprite_;
  CCSprite  *disabled_sprite_;
  CCSprite  *current_sprite_;
  CCLabelTTF *title_;
  //NSString  *name_;
};

+(FButton*)FButtonWithName:(NSString*)name Normal:(NSString*)normal Highlight:(NSString*)highlight Disabled:(NSString*)disabled Scaled:(float)sc;
+(FButton*)FButtonWithFile:(NSString*)file;
+(FButton*)FButtonWithXml:(NSString*)data;

-(id)init;
-(id)initWithName:(NSString*)name Normal:(NSString*)normal Highlight:(NSString*)highlight Disabled:(NSString*)disabled Scaled:(float)sc;

-(void)setCurentSprite:(CCSprite*)sp;

-(void)onActionEnd;
-(void)onTouchDown:(CGPoint)point;
-(void)onTouchUp:(CGPoint)point;
-(void)onTouchCancel:(CGPoint)point;
-(void)onClick:(CGPoint)point;


-(CGRect)getControlRect;
-(NSString*)getName;

@end
